load("@rules_java//java:defs.bzl", "java_library")
load("//:cel_android_rules.bzl", "cel_android_library")

package(
    default_applicable_licenses = ["//:license"],
    default_visibility = ["//visibility:public"],
)

java_library(
    name = "compiler_common",
    exports = ["//common/src/main/java/dev/cel/common:compiler_common"],
)

java_library(
    name = "options",
    # used_by_android
    exports = ["//common/src/main/java/dev/cel/common:options"],
)

java_library(
    name = "container",
    exports = ["//common/src/main/java/dev/cel/common:container"],
)

java_library(
    name = "proto_ast",
    exports = ["//common/src/main/java/dev/cel/common:proto_ast"],
)

cel_android_library(
    name = "proto_ast_android",
    exports = ["//common/src/main/java/dev/cel/common:proto_ast_android"],
)

java_library(
    name = "proto_v1alpha1_ast",
    exports = ["//common/src/main/java/dev/cel/common:proto_v1alpha1_ast"],
)

java_library(
    name = "error_codes",
    # used_by_android
    exports = ["//common/src/main/java/dev/cel/common:error_codes"],
)

java_library(
    name = "mutable_ast",
    exports = ["//common/src/main/java/dev/cel/common:mutable_ast"],
)

java_library(
    name = "mutable_source",
    exports = ["//common/src/main/java/dev/cel/common:mutable_source"],
)

java_library(
    name = "runtime_exception",
    # used_by_android
    visibility = ["//:internal"],
    exports = ["//common/src/main/java/dev/cel/common:runtime_exception"],
)

java_library(
    name = "proto_json_adapter",
    exports = ["//common/src/main/java/dev/cel/common:proto_json_adapter"],
)

java_library(
    name = "source",
    visibility = ["//:internal"],
    exports = ["//common/src/main/java/dev/cel/common:source"],
)

java_library(
    name = "source_location",
    exports = ["//common/src/main/java/dev/cel/common:source_location"],
)

java_library(
    name = "cel_source",
    exports = ["//common/src/main/java/dev/cel/common:cel_source"],
)

cel_android_library(
    name = "cel_source_android",
    exports = ["//common/src/main/java/dev/cel/common:cel_source_android"],
)

java_library(
    name = "cel_ast",
    exports = ["//common/src/main/java/dev/cel/common:cel_ast"],
)

cel_android_library(
    name = "cel_ast_android",
    exports = [
        "//common/src/main/java/dev/cel/common:cel_ast_android",
    ],
)

java_library(
    name = "cel_exception",
    # used_by_android
    exports = ["//common/src/main/java/dev/cel/common:cel_exception"],
)

java_library(
    name = "cel_descriptors",
    exports = ["//common/src/main/java/dev/cel/common:cel_descriptors"],
)
